// types/description.ts
import type { Component, VNode } from 'vue';

export interface DescriptionItemSchema {
  field?: string;
  label: string;
  hidden?: ((data: any) => boolean) | boolean;
  content?: (data: any) => any | Component | VNode;
  span?: number;
  labelClass?: string;
  contentClass?: string;
  formatter?: (value: any, data: any) => string;
}

export interface EnhancedDescriptionProps {
  schema: DescriptionItemSchema[];
  data: Record<string, any>;
  column?: number;
  border?: boolean;
  direction?: 'horizontal' | 'vertical';
  size?: 'default' | 'large' | 'small';
  title?: string;
  extra?: string;
  card?: boolean;
  cardTitle?: string;
  cardClass?: string;
  emptyText?: string;
  loading?: boolean;
  labelWidth?: number | string;
}
